vtd: Fix for irq bind failure after PCI attaching 32 times
authorFengzhe Zhang <fengzhe.zhang@intel.com>
Thu, 27 Jan 2011 11:31:46 +0000 (11:31 +0000)
committerFengzhe Zhang <fengzhe.zhang@intel.com>
Thu, 27 Jan 2011 11:31:46 +0000 (11:31 +0000)
Originally when detaching a PCI device, pirq_to_emuirq and pirq_to_irq
are freed via hypercall do_physdev_op. Now in function
pt_irq_destroy_bind_vtd, duplicated logic is added to free
pirq_to_emuirq, but not pirq_to_irq. This causes do_physdev_op fail to
free both emuirq and irq. After attaching a PCI device for 32 times,
irq resources run out. This patch removes the redundant logic.

Signed-off-by: Fengzhe Zhang <fengzhe.zhang@intel.com>
xen/drivers/passthrough/io.c

index 6e85b6b6544d2f7557f66c1b74f7b251ad5dd503..86ae0af14faa7c1aa90f3d532b78a20466ea2edd 100644 (file)
@@ -375,7 +375,6 @@ int pt_irq_destroy_bind_vtd(
             hvm_irq_dpci->mirq[machine_gsi].dom   = NULL;
             hvm_irq_dpci->mirq[machine_gsi].flags = 0;
             clear_bit(machine_gsi, hvm_irq_dpci->mapping);
-            unmap_domain_pirq_emuirq(d, machine_gsi);
         }
     }
     spin_unlock(&d->event_lock);